/*
 * @Date: 2025-08-25 10:23:13
 * @LastEditors: zhouzhupianbei@126.com zhouzhupianbei@126.com
 * @LastEditTime: 2025-09-10 14:05:57
 * @FilePath: /haishiWRJ-master/codes/ZF-WRJGL-GLPT-MANAGE/src/utils/use-g-map.js
 */
import AMapLoader from "@amap/amap-jsapi-loader";


//TODO 高德地图
export const amapSecretkey = "";
export const amapKey = "";

//TODO
export const cesiumToken =
  "..-PvcRGX44XfAd0A0Rf2E";

export function initMap(plugins) {
  window._AMapSecurityConfig = {
    securityJsCode: amapSecretkey,
  };
  return new Promise((resolve, reject) => {
    AMapLoader.load({
      key: amapKey,
      version: "2.0",
      plugins: plugins,
    })
      .then((AMap) => {
        resolve(AMap);
      })
      .catch((err) => {
        reject(err);
      });
  });
}
